---
title: Rename constraint
description: A rename constraint operation renames a constraint.
---

## Structure

```json
{
  "rename_constraint": {
    "table": "table name",
    "from": "old constraint name",
    "to": "new constraint name"
  }
}
```

The constraint is renamed on migration completion; it retains its old name during the active migration period.

## Examples

### Rename a `CHECK` constraint

Rename a `CHECK` constraint:

<ExampleSnippet example="33_rename_check_constraint.yaml" languange="yaml" />
